package com.zhanghe.study.springcloud2.stream;

import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;

/**
 * @author zh
 * @date 2022/1/7 17:33
 */
public class Source {

    @StreamListener(value = Sink.INPUT, condition = "headers['type']=='dog'")
    public void handle(String body) {
        System.out.println("Received: " + body);
    }
}
